
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="../css/popup.css"/> 
        <link rel="stylesheet" type="text/css" href="../css/kapiform.css"/> 

        <script type="text/javascript" language="javascript" src="../scripts/jQuery/kapi.js"></script>
        
        <script type="text/javascript">
             var open_cur = 0;
                $j = jQuery.noConflict();
            $j(document).ready(function(){   
               
                $j('#itemsc').easyPaginate({
                    step:1
                });
                $j(".saveT025").live("click",function(){
                    $j('.mesage').text('');
                    TV027 = $j(this).parent(".popup-footer").prev(".popup-content").find(".TV027").val();//dia chi
                    TV028 = $j(this).parent(".popup-footer").prev(".popup-content").find(".TV028").children("option:selected").val();//dia chi
                    TV029 = $j(this).parent(".popup-footer").prev(".popup-content").find(".TV029").val();//dia chi
                    TV030 = $j(this).parent(".popup-footer").prev(".popup-content").find(".TV030").val();//dia chi
                    PT025 = $j(this).attr("lang");
                    fn100 = $j(this).parent(".popup-footer").attr("lang");
                    showPleaseWait();
                    TV026 = $j("#formT025\\:tv026").val();
                  
                    $j.post("postAjaxT025.jsp?action=updateajaxT025&TV027="+TV027+"&TV028="+TV028+"&TV029="+TV029+"&TV030="+TV030+"&PT025="+PT025+"&pn100="+fn100+"&tv026="+TV026,function(data){
                        if(data != null){
                            $j(".mesage").text("Cập nhật thành công !");
                            hidePleaseWait();
                        }
                    });
                });
                $j(".pageindex").live("click",function(){
                    $j(".mesage").text("");
                });
            });
        </script>
        <style type="text/css">
            a, a:visited{
                text-decoration:none;
                color:#06C;
            }
            a:hover{color:#999;}

            /* base */

            /* content */

            ul#items{		
                margin:0;
                height:120px;
                width:auto;
                overflow:hidden;
                list-style:none !important;
            }
            ul#items li{
                list-style:none !important;
                float:left;
                width:200px;
                height:120px;
                overflow:hidden;
                margin:0 0 0 1px;
                background:#999;
                color:#fff;
                text-align:center;
            }
            ol#pagination{
                float: left;
                margin: -27px 2px 2px;
                overflow: hidden;
                width: 200px;
            }
            ol#pagination li{
                border: 1px solid gray;
                cursor: pointer;
                float: left;
                height: 11px;
                list-style: none outside none !important;
                margin-left: 5px;
                padding: 2px 9px 5px;
                position: inherit;
                width: 5px;
            }
            ol#pagination li.current{color:#f00;font-weight:bold;}
            li {
                list-style:none !important;
            }
    
            /* // content */
        </style>
    </head>
    <f:view>
        <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
        <body>
            <a4j:form id="formT025">
                <h:panelGroup rendered="#{t025Controller.render == 0}">
                    <div class="popup-content">
                        <div class="main_content">
                            <div class="form_item_content" style="margin-top:-2px">                               
                                <div class="fields_input">
                                    <label ><h:outputText value="#{locale.account_number}"/>*:</label>

                                    <h:inputText value="#{t025Controller.TV027}" id="code"  lang="16" styleClass="required maxlength" />
                                    <label style="width:64px;"><h:outputText value="#{locale.currency}"/>:</label>

                                    <h:selectOneMenu id="comboboxn550" value="#{t025Controller.TV028}"  styleClass="combobox"  style="width:120px;">
                                        <%-- <f:selectItems value="#{k100supplierController.combN550}"></f:selectItems> --%>
                                        <f:selectItem itemValue="VND"  itemLabel="VND"/>
                                        <f:selectItem itemValue="USD"  itemLabel="USD"/>                                            
                                        <f:selectItem itemValue="EUR"  itemLabel="EUR"/>
                                    </h:selectOneMenu>


                                    <h:inputHidden id="page" value="#{t025Controller.pagereload}"/>
                                </div>

                                <div class="fields_input">
                                    <label ><h:outputText value="#{locale.bank}"/> <span>*:</span></label>
                                    <h:inputText value="#{t025Controller.TV029}" styleClass="required" id="cusname" style="width:360px;" />

                                </div>

                                <div class="fields_input">
                                    <label ><h:outputText value="#{locale.address}"/>:</label>
                                    <h:inputText value="#{t025Controller.TV030}" id="contact" style="width:360px;"/>

                                </div>
                            </div>

                        </div>

                    </div>
                    <div class="popup-footer">
                        <h:outputText value="#{t025Controller.messageform}" id="mesage" styleClass="mesage"/>

                        <a4j:commandButton reRender="mesage" onclick="showPleaseWait();$j('.mesage').text('');" oncomplete="hidePleaseWait();"    action="#{t025Controller.updateT025}" value="#{locale.button_save}" styleClass="buttonsave">
                            <f:param value="#{t025Controller.REFID}" name="pn100"/>
                           
                            <f:param value="abc" name="table1"></f:param>  
                        </a4j:commandButton>


                    </div>
                </h:panelGroup>
                <h:panelGroup rendered="#{t025Controller.listAjaxT025Bean!= null}">
                    <div id="itemsc">
                        <a4j:repeat  value="#{t025Controller.listAjaxT025Bean}" var="item">  
                            <li>
                                <div class="popup-content">
                                    <div class="main_content">
                                        <div class="form_item_content" style="margin-top:-2px">                                
                                            <div class="fields_input" style="margin-top:3px;">
                                                <label ><h:outputText value="#{locale.account_number}"/>*</label>

                                                <h:inputText value="#{item.TV027}" id="code"  lang="16" styleClass="required maxlength TV027" />
                                                <label style="width:64px;"><h:outputText value="#{locale.currency}"/></label>

                                                <h:selectOneMenu id="comboboxn550" value="#{item.TV028}"  styleClass="combobox TV028"  style="width:120px;">
                                                    <%-- <f:selectItems value="#{k100supplierController.combN550}"></f:selectItems> --%>
                                                    <f:selectItem itemValue="VND"  itemLabel="VND"/>
                                                    <f:selectItem itemValue="USD"  itemLabel="USD"/>                                            
                                                    <f:selectItem itemValue="EUR"  itemLabel="EUR"/>
                                                </h:selectOneMenu>                                               
                                            </div>
                                            <div class="fields_input">
                                                <label ><h:outputText value="#{locale.bank}"/> <span>*</span></label>
                                                <h:inputText value="#{item.TV029}" styleClass="required TV029" id="cusname" style="width:360px;" />

                                            </div>

                                            <div class="fields_input">
                                                <label ><h:outputText value="#{locale.address}"/></label>
                                                <h:inputText value="#{item.TV030}" id="contact" style="width:360px;" styleClass="TV030" />

                                            </div>
                                        </div>

                                    </div>

                                </div>
                                <div class="popup-footer" lang="<h:outputText value="#{t025Controller.REFID}"/>">

                                    <h:outputText value="#{t025Controller.messageform}" id="mesage" styleClass="mesage"/>
                                    <div  class="buttonsave saveT025" lang="<h:outputText value="#{item.PT025}"/>">
                                        <h:outputText value='#{locale.save}' style="margin-right:22px;"/>
                                    </div>    
                                </div>
                            </li>
                        </a4j:repeat>
                    </div>
                </h:panelGroup>
                
                <h:inputHidden value="#{t025Controller.TV026}" id="tv026"/>
            </a4j:form>
        </body>
    </f:view>

</html>
